package org.qs.webservice.dao.user;


import org.apache.ibatis.annotations.Param;
import org.qs.webservice.domain.UsUser;
import org.springframework.stereotype.Component;

@Component
public interface UsUserMapper {
	UsUser getCustomUserByUsername(@Param("username")String username);
	/**
	 * 添加用户
	 * @Title: addUser 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 */
	int addUser(UsUser user);
	
	/**
	 * 根据userid获取用户
	 * @Title: getCustomUserByUserid 
	 * @param user_id
	 * @return   
	 * @return UsUser    
	 * @throws
	 */
	UsUser getCustomUserByUserid(@Param("user_id")Long user_id);
	/**
	 * 根据userid获取用户余额积分订购状态
	 * @param user_id
	 * @return
	 */
	UsUser getCustomUserInfoByUserid(@Param("user_id")Long user_id,@Param("book_id")int book_id);
	/**
	 * 根据邮箱获取用户
	 * @param email
	 * @return
	 */
	UsUser getCustomUserByEmail(@Param("email")String email);
	/**
	 * 根据手机号获取用户
	 * @param email
	 * @return
	 */
	UsUser getCustomUserByMobile(@Param("mobile_num")String mobile_num);
	/**
	 * 根据user_identifier获取绑定 
	 * @Title: getSsoUserByUserIdentifier 
	 * @param user_identifier
	 * @return   
	 * @return UsUser    
	 * @throws
	 */
	UsUser getSsoUserByUserIdentifier(@Param("user_identifier")String user_identifier,@Param("open_id")int open_id);
	UsUser getSsoUserByUserId(@Param("user_id")Long user_id,@Param("open_id")int open_id);
	/**
	 * 更新绑定信息
	 * @param user
	 * @return
	 */
	int updateUserBand(UsUser user);
	/**
	 * 更新密码
	 * @Title: updateUserPasswd 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 */
	int updateUserPasswd(UsUser user);
	/**
	 * 更新用户信息
	 * @param user
	 * @return
	 */
	int updateUser(UsUser user);
	
	/**
	 * 修改用户头像
	 * @Title: updateUserImage 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 */
	int updateUserImage(UsUser user);
	
	
	
	/*UsUser getSimpleUserByList(@Param("mobile_num")String mobile_num,@Param("device_identifier")String device_identifier,@Param("promot_channel")String promot_channel,@Param("regist_source")int regist_source);
	UsUser getCustomUserByList(@Param("mobile_num")String mobile_num,@Param("user_password")String user_password);
	UsUser getSsoUserByList(@Param("user_identifier")String user_identifier,@Param("device_identifier")String device_identifier,@Param("user_name")String user_name,@Param("regist_source")int regist_source,@Param("promot_channel")String promot_channel);
*/	/**
	 * 根据用户名获取用户
	 * @Title: getCustomUserByUsername 
	 * @param username
	 * @return   
	 * @return UsUser    
	 * @throws
	 */
	
/*	*//**
	 * 根据手机号获取用户
	 * @Title: getCustomUserByPhone 
	 * @param phone
	 * @return   
	 * @return UsUser    
	 * @throws
	 *//*
	UsUser getCustomUserByPhone(@Param("phone")String phone);
	
	*//**
	 * 添加用户
	 * @Title: addUser 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int addUser(UsUser user);
	int updateUserBand(UsUser user);
	
	*//**
	 * 添加绑定信息
	 * @Title: addUsBand 
	 * @param usband
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int addUsBand(UsUser usband);
	*/
	/**
	 * 修改用户头像
	 * @Title: updateUserImage 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int updateUserImage(UsUser user);
	*//**
	 * 修改用户信息
	 * @Title: updateInfoByUserid 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int updateInfoByUserid(UsUser user);
	*//**
	 * 修改用户绑定信息
	 * @Title: updateBindByUserid 
	 * @param user
	 * @return   
	 * @return int    
	 * @throws
	 *//*
	int updateBindByUserid(UsUser user);
	*//**
	 * 根据user_id和获取用户
	 * @Title: getSsoUserByUserIdentifier 
	 * @param user_identifier
	 * @return   
	 * @return UsUser    
	 * @throws
	 *//*
	UsUser getSsoUserByUserIdAndChannel(@Param("user_id")Long user_id,@Param("open_id")String open_id);
	
	*//**
	 * 根据userid获取用户
	 * @Title: getCustomUserByUserid 
	 * @param user_id
	 * @return   
	 * @return UsUser    
	 * @throws
	 *//*
	UsUser getCustomUserByUserid(@Param("user_id")Long user_id);
	*//**
	 * 根据userid获取用户急指定一个配置信息
	 * @Title: getCustomUserAndOneCOnfigByUserid 
	 * @param user_id
	 * @param config_id
	 * @return   
	 * @return UsUser    
	 * @throws
	 *//*
	UsUser getCustomUserAndOneCOnfigByUserid(@Param("user_id")Long user_id,@Param("config_id")int config_id);
*/	
}